﻿<windowsToolbar:SelectionContainer x:Class="Windows.Toolbar.Controls.Specialized.LineStylePicker"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:media="clr-namespace:System.Windows.Media;assembly=System.Windows"
    xmlns:windowsToolbar="clr-namespace:Windows.Toolbar.Controls"
    xmlns:windowsToolbarSpecialized="clr-namespace:Windows.Toolbar.Controls.Specialized"
    Width="180" >

    <windowsToolbar:SelectionContainer.Resources>
        <windowsToolbarSpecialized:VisibleWhenNoStyleConverter x:Key="VisibleWhenNoStyleConverter" />

        <windowsToolbarSpecialized:CollapsedWhenNoStyleConverter x:Key="CollapsedWhenNoStyleConverter" />
    </windowsToolbar:SelectionContainer.Resources>

    <Border BorderBrush="#868686" BorderThickness="1" CornerRadius="3" Background="White">
        <StackPanel>
            <ListBox x:Name="LinesListBox" SelectionChanged="LinesListBox_SelectionChanged"
    			ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel>
                            <Grid Height="12">                                                                                                                       
                                <Line X1="0" X2="168" Y1="0" Y2="0" Width="168" Height="1" VerticalAlignment="Center"  
                                    Stroke="Black" 
                                    StrokeDashArray="{Binding}" 
                                    Visibility="{Binding Converter={StaticResource CollapsedWhenNoStyleConverter}}" />

                                <TextBlock Text="No Line" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Width="168"
                                    Visibility="{Binding Converter={StaticResource VisibleWhenNoStyleConverter}}"/>                            
                            </Grid>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>

                <media:DoubleCollection>0</media:DoubleCollection>
                <media:DoubleCollection></media:DoubleCollection>
                <media:DoubleCollection>17,8</media:DoubleCollection>
                <media:DoubleCollection>9,4</media:DoubleCollection>
                <media:DoubleCollection>9,4,2,4</media:DoubleCollection>
                <media:DoubleCollection>9,4,2,4,2,4</media:DoubleCollection>
                <media:DoubleCollection>21,4,5,4</media:DoubleCollection>
            </ListBox>
        </StackPanel>
    </Border>
</windowsToolbar:SelectionContainer>
